using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;

namespace LispInterpretor.Parsers
{
    public class StringParser : IParser
    {
        #region IParser Members

        public bool Is(string text, Environment environment)
        {
            Regex stringPattern = new Regex(@"^""[^""]+""");

            return stringPattern.IsMatch(text);
        }

        public object Evaluate(string text, Environment environment)
        {
            return text.Replace("\"", string.Empty);
        }

        #endregion
    }
}
